﻿@model GosWeb.Models.Db.Biont
@{
    ViewBag.Title = "修改";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@{
string dieStyle = "style =\"color:Green\"";
if (Model.FromTo ==(int) GosWeb.Models.Db.FromToType.Died)
{
    dieStyle = "style =\"color:Gray\"";
} 
}

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>@ViewBag.Title  [ | @Html.ActionLink("详细信息", "Details", new { id = Model.BiontID }) ]</legend>  
        <table>
        <tr>
         <td class="editor-label", @Html.Raw(dieStyle)>
            @Html.LabelFor(model => model.BiontID)
        </td>
        <td class="editor-field", @Html.Raw(dieStyle)>
            @Html.TextBoxFor(model => model.BiontID, new { @readonly = "readonly" })
        </td>       
        </tr>
        <tr>
         <td class="editor-label">
            @Html.LabelFor(model => model.Sex)
        </td>
        <td class="editor-field">
            @Html.DropDownListFor(model => model.Sex, new SelectList(GosWeb.Models.Db.GenderKeyValue.Genders, "GenderId", "Name"))
            @Html.ValidationMessageFor(model => model.Sex)
        </td>       
        </tr>
        <tr>
         <td class="editor-label">
            @Html.LabelFor(model => model.Birthday)
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.Birthday)
            @Html.ValidationMessageFor(model => model.Birthday)
        </td>  
        <tr>     
        <td class="editor-label">
            @Html.LabelFor(model => model.FatherID)
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.FatherID)
            @Html.ValidationMessageFor(model => model.FatherID)
        </td> 
        </tr>
        <tr>       
         <td class="editor-label">
            @Html.LabelFor(model => model.MotherID)
        </td>
     
        <td class="editor-field">
            @Html.EditorFor(model => model.MotherID)
            @Html.ValidationMessageFor(model => model.MotherID)
        </td>
        </tr>       
        </tr>
        <tr>
         <td class="editor-label">
            @Html.LabelFor(model => model.LeftTitNumber)
        </td>
 
        <td class="editor-field">
            @Html.EditorFor(model => model.LeftTitNumber)
            @Html.ValidationMessageFor(model => model.LeftTitNumber)
        </td>  
       </tr>
        <tr>
         <td class="editor-label">
            @Html.LabelFor(model => model.RightTitNumber)
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.RightTitNumber)
            @Html.ValidationMessageFor(model => model.RightTitNumber)
        </td>  
        </tr>
        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.Weight)
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.Weight)
            @Html.ValidationMessageFor(model => model.Weight)
        </td>  
        </tr>
        <tr>
         <td class="editor-label">
            @Html.LabelFor(model => model.NestNumber)
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.NestNumber)
            @Html.ValidationMessageFor(model => model.NestNumber)
        </td>       
        </tr>

        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.Address.Site)
        </td>
        <td class="editor-field">
            @Html.DropDownListFor(model => model.Address.Site,new SelectList(GosWeb.Biz.BiontBiz.GetInstance().GetSites(),"Code","Value"))
            @Html.ValidationMessageFor(model => model.Address.Site)
        </td>        
        </tr>
        @*
         <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.Address.Building)
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.Address.Building)
            @Html.ValidationMessageFor(model => model.Address.Building)
        </td>        
        </tr>
        <tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.Address.Room)
        </td>
        <td class="editor-field">
            @Html.EditorFor(model => model.Address.Room)
            @Html.ValidationMessageFor(model => model.Address.Room)
        </td>        
        </tr>   
        *@   
        <tr>
         <td class="editor-label", @Html.Raw(dieStyle)>
            @Html.LabelFor(model => model.FromTo)
        </td>
        <td class="editor-field", @Html.Raw(dieStyle)>
            @Html.DropDownListFor(model => model.FromTo, new SelectList(GosWeb.Models.Db.FromToValue.FromToes, "Id", "Name"))
            @Html.ValidationMessageFor(model => model.FromTo)
        </td>       
        </tr>
        <tr>
         <td class="editor-label">
            @Html.LabelFor(model => model.PrivInfo)
        </td>
        <td class="editor-field">
            @Html.TextAreaFor(model => model.PrivInfo)
            @Html.ValidationMessageFor(model => model.PrivInfo)
        </td>       
        </tr>
        <td class="editor-label">
            @Html.LabelFor(model => model.PubInfo)
        </td>
        <td class="editor-field">
            @Html.TextAreaFor(model => model.PubInfo)
            @Html.ValidationMessageFor(model => model.PubInfo)
        </td>    
        <tr>
        
        </tr>
        </table>
        <p>
            <input type="submit" value="保存" />
        </p>
    </fieldset>
}
<div>

</div>

